use crate::core::vec3::*;

pub struct Ray{
    pub orig: Point3,
    pub dir: Vec3New
}

impl Ray{
    // pub fn new() -> Ray{
    //     Ray{orig:Point3::new(),dir:Vec3New::new()}
    // }

    pub fn from(origin: &Point3, direction: &Vec3New) -> Ray{
        Ray{orig: *origin, dir: *direction}
    }

    pub fn origin(&self) -> Point3{
        self.orig
    }

    pub fn direction(&self) -> Vec3New{
        self.dir
    }

    pub fn at(&self, t: f64) -> Point3{
        self.orig + t * &self.dir
    }
}